class {
    onMount() {
        window.hello = this;
    }

    handleClick() {
        this.clicked = true;
    }
}
<div.hello on-click('handleClick')>
    Hello
</div>
